package com.gxa.p2p.exception;

import com.gxa.p2p.businessExceptionCode.ErrorCode;

public class BusinessException extends RuntimeException {

    private static final long serialVersionUID = 6023872325697695742L;
    private ErrorCode errorCode;

    public BusinessException(ErrorCode errorCode) {
        super(errorCode.getDesc().toString());
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }
}
